import Axios from 'axios';


const BASEPTAH = 'http://127.0.0.1:7001'

export const doGET = (url,params) =>{


    return Axios({
        method: 'get',
        url,
        params,
        baseURL:BASEPTAH,
        withCredentials: true,
        timeout: 1000,
        responseType: 'json', // default
        responseEncoding: 'utf8', // default
    })
}


export const doPOST = (url,data) =>{


    return Axios({
        method: 'post',
        url,
        data,
        withCredentials: true,
        baseURL:BASEPTAH,
        timeout: 1000,
        responseType: 'json', // default

        // `responseEncoding` indicates encoding to use for decoding responses
        // Note: Ignored for `responseType` of 'stream' or client-side requests
        responseEncoding: 'utf8', // default
    })
}